// Controls the different hover effects of the site using the hoverIntent plugin. The first parameter defines the 'mouseenter' property, whereas the second defines 'mouseout'

jQuery(document).ready(function(){
	
		//if javascript is enabled, remove the style tag containing the hover states for the top nav options
		
		if(document)
		{
			jQuery('div#logo-nav-contain').children().eq(1).remove();
		}
	
		//control the hover states for each of the main navigation items
	
		jQuery('div#nav-contain').find('a#home').hoverIntent(mouseover,mouseout);
		
		function mouseover(){
			
				jQuery('div#home-fade').fadeIn('fast');
				jQuery('div#home-shadow').fadeIn('fast');
			};
		function mouseout(){
			
				jQuery('div#home-fade').fadeOut('fast');
				jQuery('div#home-shadow').fadeOut('fast');
			};
				
		jQuery('a#skills').hoverIntent(shadowOn,shadowOut);
		
		function shadowOn(){
				jQuery('div#skills-fade').fadeIn('fast');
				jQuery('div#shadow-left').fadeIn('fast');
				jQuery('div#shadow-right').fadeIn('fast');
		};
		
		function shadowOut(){
				jQuery('div#skills-fade').fadeOut('fast');
				jQuery('div#shadow-left').fadeOut('fast');
				jQuery('div#shadow-right').fadeOut('fast');
		};
		
		jQuery('a#works').hoverIntent(workOn,workOff);
		
		function workOn()
		{
				jQuery('div#work-fade').fadeIn('fast');
				jQuery('div#work-left').fadeIn('fast');
				jQuery('div#work-right').fadeIn('fast');
		}
		
		function workOff()
		{
				jQuery('div#work-fade').fadeOut('fast');
				jQuery('div#work-left').fadeOut('fast');
				jQuery('div#work-right').fadeOut('fast');
		}
		
		jQuery('a#contact').hoverIntent(contactOn,contactOff);
		
		function contactOn()
		{
				jQuery('div#contact-fade').fadeIn('fast');
				jQuery('div#contact-left').fadeIn('fast');
		}
		
		function contactOff()
		{
				jQuery('div#contact-fade').fadeOut('fast');
				jQuery('div#contact-left').fadeOut('fast');
		}
		
		jQuery('a#home').click(function(e){

		})
	
})